$OpenBSD: patch-Makefile_in,v 1.2 2017/05/25 14:39:59 sthen Exp $

-nostdlib:	 undefined symbol '__guard_local'
remove getopt.c: fix with clang

Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
@@ -107,10 +107,10 @@ man_MANS = trickle.1 trickled.8 trickled.conf.5
 bin_PROGRAMS = trickle trickled tricklectl
 
 trickle_DEPENDENCIES = @ERRO@ @LIBOBJS@
-trickle_SOURCES = trickle.c util.c getopt.c
+trickle_SOURCES = trickle.c util.c
 trickle_LDADD = @ERRO@ @LIBOBJS@
 
-trickled_SOURCES = trickled.c atomicio.c print.c bwstat.c client.c conf.c                    util.c cleanup.c getopt.c xdr.c
+trickled_SOURCES = trickled.c atomicio.c print.c bwstat.c client.c conf.c                    util.c cleanup.c xdr.c
 
 trickled_LDADD = @EVENTLIB@ @LIBOBJS@
 
@@ -138,11 +138,11 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
-trickle_OBJECTS =  trickle.$(OBJEXT) util.$(OBJEXT) getopt.$(OBJEXT)
+trickle_OBJECTS =  trickle.$(OBJEXT) util.$(OBJEXT)
 trickle_LDFLAGS = 
 trickled_OBJECTS =  trickled.$(OBJEXT) atomicio.$(OBJEXT) \
 print.$(OBJEXT) bwstat.$(OBJEXT) client.$(OBJEXT) conf.$(OBJEXT) \
-util.$(OBJEXT) cleanup.$(OBJEXT) getopt.$(OBJEXT) xdr.$(OBJEXT)
+util.$(OBJEXT) cleanup.$(OBJEXT) xdr.$(OBJEXT)
 trickled_DEPENDENCIES =  @LIBOBJS@
 trickled_LDFLAGS = 
 tricklectl_OBJECTS =  tricklectl.$(OBJEXT) trickledu.$(OBJEXT) \
@@ -618,7 +618,7 @@ mostlyclean distclean maintainer-clean
 trickle-overload.so: $(TRICKLEOVERLOADFILES)
 	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libtmp$@.la                \
 		-rpath $(libdir)/trickle $(TRICKLEOVERLOADFILES) $(LIBS)     \
-		$(LDFLAGS) -module -avoid-version -nostdlib @LIBDL@
+		$(LDFLAGS) -module -avoid-version @LIBDL@
 	@rm -f libtmp$@.la tmp$@.so* $@
 	@cp .libs/libtmp$@.so $@
 	@rm -f .libs/libtmp$@.*
